package icasue.net.protocol.http.common;

import java.nio.charset.Charset;
import java.time.format.DateTimeFormatter;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/4/8 下午6:42
 * @UpdateDate:
 * @Description:
 */
public class Const {

    public static final String BLOCK_SIZE_ZERO = "0";
    public static final String HEADER_CONTENT_LENGTH = "Content-Length";
    public static final String HEADER_CONTENT_TYPE = "Content-Type";

    public static final String HEADER_CONTENT_ENCODING_LOWER = "content-encoding";
    public static final String HEADER_CONTENT_ENCODING_UPPER = "Content-Encoding";
    public static final char _r = '\r';
    public static final String ENCODER_TYPE_GZIP = "gzip";
    public static final String ENCODER_TYPE_DEFLATE = "deflate";
    public static final String ENCODER_TYPE_BR = "br";
    public static final String ENCODER_TYPE_DEFAULT = "default";

    public static final Charset UTF_8 = Charset.forName("UTF-8");
    public static final String NEW_LINE = "\n";
    public static final String $STRING_EMPTY = "";
    public static final String $REGEX_HEAD = "^";
    public static final String $REGEX_END = "$";
    public static final String $REGEX_ANY = "*";
    public static final String SPACE = " ";
    public static final String $AT = "@";
    public static final String $AND = "&";
    public static final String $QUERY = "?";
    public static final String $DOT = ",";
    public static final String GTE = ">=";
    public static final String LTE = "<=";
    public static final String GT = ">";
    public static final String LT = "<";
    public static final String EQ = "=";
    public static final String $SPOT = ".";
    public static final String $COLON = ":";
    public static final String $PATH_DELIMITER = "/";
    public static final String $DECR_SYMBOL = "-";
    public static final String $BOTTOM_LINE = "_";

    public static final String PROTOCOL_HTTP_LINE = "\r\n";


    public static final String NORMAL_DATE_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";
    public static final String COMBINE_DATE_FORMAT_PATTERN = "yyyyMMddHHmmss";

    public static final DateTimeFormatter DF_NORMAL = DateTimeFormatter.ofPattern(NORMAL_DATE_FORMAT_PATTERN);
    public static final DateTimeFormatter DF_COMBINE = DateTimeFormatter.ofPattern(COMBINE_DATE_FORMAT_PATTERN);
}
